package com.yobol.jgrowth.service.impl;

import com.yobol.jgrowth.domain.Tag;
import com.yobol.jgrowth.mapper.TagMapper;
import com.yobol.jgrowth.service.TagService;
import org.springframework.beans.factory.annotation.Autowired;
import org.springframework.stereotype.Service;

/**
 * Implement TagService
 *
 * @author
 * @create 2018-04-04 18:09
 **/

@Service
public class TagServiceImpl implements TagService {

    @Autowired
    TagMapper tagMapper;

    @Override
    public int addTag(Tag tag) {
        return tagMapper.insert(tag);
    }

    @Override
    public int deleteTagByAid(int aid) {
        return tagMapper.deleteTagByAid(aid);
    }

    @Override
    public Tag getTagByAid(int aid) {
        return tagMapper.getTagByAid(aid);
    }

    @Override
    public int updateTagByPrimaryKey(Tag articleTag) {
        return tagMapper.updateTagByPrimaryKey(articleTag);
    }

}
